package com.fujitsu.nanjing.tieba.ibator;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class CoreVisitStatCriteria {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    private Integer mysqlOffset;

    private Integer mysqlLength;

    public CoreVisitStatCriteria() {
        oredCriteria = new ArrayList<Criteria>();
    }

    protected CoreVisitStatCriteria(CoreVisitStatCriteria example) {
        this.orderByClause = example.orderByClause;
        this.oredCriteria = example.oredCriteria;
        this.distinct = example.distinct;
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    public void setMysqlOffset(Integer mysqlOffset) {
        this.mysqlOffset = mysqlOffset;
    }

    public Integer getMysqlOffset() {
        return mysqlOffset;
    }

    public void setMysqlLength(Integer mysqlLength) {
        this.mysqlLength = mysqlLength;
    }

    public Integer getMysqlLength() {
        return mysqlLength;
    }

    protected abstract static class GeneratedCriteria {
        protected List<String> criteriaWithoutValue;

        protected List<Map<String, Object>> criteriaWithSingleValue;

        protected List<Map<String, Object>> criteriaWithListValue;

        protected List<Map<String, Object>> criteriaWithBetweenValue;

        protected GeneratedCriteria() {
            super();
            criteriaWithoutValue = new ArrayList<String>();
            criteriaWithSingleValue = new ArrayList<Map<String, Object>>();
            criteriaWithListValue = new ArrayList<Map<String, Object>>();
            criteriaWithBetweenValue = new ArrayList<Map<String, Object>>();
        }

        public boolean isValid() {
            return criteriaWithoutValue.size() > 0
                || criteriaWithSingleValue.size() > 0
                || criteriaWithListValue.size() > 0
                || criteriaWithBetweenValue.size() > 0;
        }

        public List<String> getCriteriaWithoutValue() {
            return criteriaWithoutValue;
        }

        public void setCriteriaWithoutValue(List<String> criteriaWithoutValue) {
            this.criteriaWithoutValue = criteriaWithoutValue;
        }

        public List<Map<String, Object>> getCriteriaWithSingleValue() {
            return criteriaWithSingleValue;
        }

        public void setCriteriaWithSingleValue(List<Map<String, Object>> criteriaWithSingleValue) {
            this.criteriaWithSingleValue = criteriaWithSingleValue;
        }

        public List<Map<String, Object>> getCriteriaWithListValue() {
            return criteriaWithListValue;
        }

        public void setCriteriaWithListValue(List<Map<String, Object>> criteriaWithListValue) {
            this.criteriaWithListValue = criteriaWithListValue;
        }

        public List<Map<String, Object>> getCriteriaWithBetweenValue() {
            return criteriaWithBetweenValue;
        }

        public void setCriteriaWithBetweenValue(List<Map<String, Object>> criteriaWithBetweenValue) {
            this.criteriaWithBetweenValue = criteriaWithBetweenValue;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteriaWithoutValue.add(condition);
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            Map<String, Object> map = new HashMap<String, Object>();
            map.put("condition", condition);
            map.put("value", value);
            criteriaWithSingleValue.add(map);
        }

        protected void addCriterion(String condition, List<? extends Object> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            Map<String, Object> map = new HashMap<String, Object>();
            map.put("condition", condition);
            map.put("values", values);
            criteriaWithListValue.add(map);
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            List<Object> list = new ArrayList<Object>();
            list.add(value1);
            list.add(value2);
            Map<String, Object> map = new HashMap<String, Object>();
            map.put("condition", condition);
            map.put("values", list);
            criteriaWithBetweenValue.add(map);
        }

        public Criteria andStatdateIsNull() {
            addCriterion("statDate is null");
            return (Criteria) this;
        }

        public Criteria andStatdateIsNotNull() {
            addCriterion("statDate is not null");
            return (Criteria) this;
        }

        public Criteria andStatdateEqualTo(String value) {
            addCriterion("statDate =", value, "statdate");
            return (Criteria) this;
        }

        public Criteria andStatdateNotEqualTo(String value) {
            addCriterion("statDate <>", value, "statdate");
            return (Criteria) this;
        }

        public Criteria andStatdateGreaterThan(String value) {
            addCriterion("statDate >", value, "statdate");
            return (Criteria) this;
        }

        public Criteria andStatdateGreaterThanOrEqualTo(String value) {
            addCriterion("statDate >=", value, "statdate");
            return (Criteria) this;
        }

        public Criteria andStatdateLessThan(String value) {
            addCriterion("statDate <", value, "statdate");
            return (Criteria) this;
        }

        public Criteria andStatdateLessThanOrEqualTo(String value) {
            addCriterion("statDate <=", value, "statdate");
            return (Criteria) this;
        }

        public Criteria andStatdateLike(String value) {
            addCriterion("statDate like", value, "statdate");
            return (Criteria) this;
        }

        public Criteria andStatdateNotLike(String value) {
            addCriterion("statDate not like", value, "statdate");
            return (Criteria) this;
        }

        public Criteria andStatdateIn(List<String> values) {
            addCriterion("statDate in", values, "statdate");
            return (Criteria) this;
        }

        public Criteria andStatdateNotIn(List<String> values) {
            addCriterion("statDate not in", values, "statdate");
            return (Criteria) this;
        }

        public Criteria andStatdateBetween(String value1, String value2) {
            addCriterion("statDate between", value1, value2, "statdate");
            return (Criteria) this;
        }

        public Criteria andStatdateNotBetween(String value1, String value2) {
            addCriterion("statDate not between", value1, value2, "statdate");
            return (Criteria) this;
        }

        public Criteria andTopicsIsNull() {
            addCriterion("topics is null");
            return (Criteria) this;
        }

        public Criteria andTopicsIsNotNull() {
            addCriterion("topics is not null");
            return (Criteria) this;
        }

        public Criteria andTopicsEqualTo(Integer value) {
            addCriterion("topics =", value, "topics");
            return (Criteria) this;
        }

        public Criteria andTopicsNotEqualTo(Integer value) {
            addCriterion("topics <>", value, "topics");
            return (Criteria) this;
        }

        public Criteria andTopicsGreaterThan(Integer value) {
            addCriterion("topics >", value, "topics");
            return (Criteria) this;
        }

        public Criteria andTopicsGreaterThanOrEqualTo(Integer value) {
            addCriterion("topics >=", value, "topics");
            return (Criteria) this;
        }

        public Criteria andTopicsLessThan(Integer value) {
            addCriterion("topics <", value, "topics");
            return (Criteria) this;
        }

        public Criteria andTopicsLessThanOrEqualTo(Integer value) {
            addCriterion("topics <=", value, "topics");
            return (Criteria) this;
        }

        public Criteria andTopicsIn(List<Integer> values) {
            addCriterion("topics in", values, "topics");
            return (Criteria) this;
        }

        public Criteria andTopicsNotIn(List<Integer> values) {
            addCriterion("topics not in", values, "topics");
            return (Criteria) this;
        }

        public Criteria andTopicsBetween(Integer value1, Integer value2) {
            addCriterion("topics between", value1, value2, "topics");
            return (Criteria) this;
        }

        public Criteria andTopicsNotBetween(Integer value1, Integer value2) {
            addCriterion("topics not between", value1, value2, "topics");
            return (Criteria) this;
        }

        public Criteria andRepliesIsNull() {
            addCriterion("replies is null");
            return (Criteria) this;
        }

        public Criteria andRepliesIsNotNull() {
            addCriterion("replies is not null");
            return (Criteria) this;
        }

        public Criteria andRepliesEqualTo(Integer value) {
            addCriterion("replies =", value, "replies");
            return (Criteria) this;
        }

        public Criteria andRepliesNotEqualTo(Integer value) {
            addCriterion("replies <>", value, "replies");
            return (Criteria) this;
        }

        public Criteria andRepliesGreaterThan(Integer value) {
            addCriterion("replies >", value, "replies");
            return (Criteria) this;
        }

        public Criteria andRepliesGreaterThanOrEqualTo(Integer value) {
            addCriterion("replies >=", value, "replies");
            return (Criteria) this;
        }

        public Criteria andRepliesLessThan(Integer value) {
            addCriterion("replies <", value, "replies");
            return (Criteria) this;
        }

        public Criteria andRepliesLessThanOrEqualTo(Integer value) {
            addCriterion("replies <=", value, "replies");
            return (Criteria) this;
        }

        public Criteria andRepliesIn(List<Integer> values) {
            addCriterion("replies in", values, "replies");
            return (Criteria) this;
        }

        public Criteria andRepliesNotIn(List<Integer> values) {
            addCriterion("replies not in", values, "replies");
            return (Criteria) this;
        }

        public Criteria andRepliesBetween(Integer value1, Integer value2) {
            addCriterion("replies between", value1, value2, "replies");
            return (Criteria) this;
        }

        public Criteria andRepliesNotBetween(Integer value1, Integer value2) {
            addCriterion("replies not between", value1, value2, "replies");
            return (Criteria) this;
        }

        public Criteria andUsersIsNull() {
            addCriterion("users is null");
            return (Criteria) this;
        }

        public Criteria andUsersIsNotNull() {
            addCriterion("users is not null");
            return (Criteria) this;
        }

        public Criteria andUsersEqualTo(Integer value) {
            addCriterion("users =", value, "users");
            return (Criteria) this;
        }

        public Criteria andUsersNotEqualTo(Integer value) {
            addCriterion("users <>", value, "users");
            return (Criteria) this;
        }

        public Criteria andUsersGreaterThan(Integer value) {
            addCriterion("users >", value, "users");
            return (Criteria) this;
        }

        public Criteria andUsersGreaterThanOrEqualTo(Integer value) {
            addCriterion("users >=", value, "users");
            return (Criteria) this;
        }

        public Criteria andUsersLessThan(Integer value) {
            addCriterion("users <", value, "users");
            return (Criteria) this;
        }

        public Criteria andUsersLessThanOrEqualTo(Integer value) {
            addCriterion("users <=", value, "users");
            return (Criteria) this;
        }

        public Criteria andUsersIn(List<Integer> values) {
            addCriterion("users in", values, "users");
            return (Criteria) this;
        }

        public Criteria andUsersNotIn(List<Integer> values) {
            addCriterion("users not in", values, "users");
            return (Criteria) this;
        }

        public Criteria andUsersBetween(Integer value1, Integer value2) {
            addCriterion("users between", value1, value2, "users");
            return (Criteria) this;
        }

        public Criteria andUsersNotBetween(Integer value1, Integer value2) {
            addCriterion("users not between", value1, value2, "users");
            return (Criteria) this;
        }

        public Criteria andVisitsIsNull() {
            addCriterion("visits is null");
            return (Criteria) this;
        }

        public Criteria andVisitsIsNotNull() {
            addCriterion("visits is not null");
            return (Criteria) this;
        }

        public Criteria andVisitsEqualTo(Integer value) {
            addCriterion("visits =", value, "visits");
            return (Criteria) this;
        }

        public Criteria andVisitsNotEqualTo(Integer value) {
            addCriterion("visits <>", value, "visits");
            return (Criteria) this;
        }

        public Criteria andVisitsGreaterThan(Integer value) {
            addCriterion("visits >", value, "visits");
            return (Criteria) this;
        }

        public Criteria andVisitsGreaterThanOrEqualTo(Integer value) {
            addCriterion("visits >=", value, "visits");
            return (Criteria) this;
        }

        public Criteria andVisitsLessThan(Integer value) {
            addCriterion("visits <", value, "visits");
            return (Criteria) this;
        }

        public Criteria andVisitsLessThanOrEqualTo(Integer value) {
            addCriterion("visits <=", value, "visits");
            return (Criteria) this;
        }

        public Criteria andVisitsIn(List<Integer> values) {
            addCriterion("visits in", values, "visits");
            return (Criteria) this;
        }

        public Criteria andVisitsNotIn(List<Integer> values) {
            addCriterion("visits not in", values, "visits");
            return (Criteria) this;
        }

        public Criteria andVisitsBetween(Integer value1, Integer value2) {
            addCriterion("visits between", value1, value2, "visits");
            return (Criteria) this;
        }

        public Criteria andVisitsNotBetween(Integer value1, Integer value2) {
            addCriterion("visits not between", value1, value2, "visits");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }

        public Criteria andStatdateLikeInsensitive(String value) {
            addCriterion("upper(statDate) like", value.toUpperCase(), "statdate");
            return this;
        }
    }
}